gtk4.git
4 years agomacos: fix weird menubar rendering.
Zhi [Sun, 30 May 2021 00:02:18 +0000 (08:02 +0800)]
macos: fix weird menubar rendering.

As app menu has been deprecated, the function of app menu should be
merged into the menubar, which behaves like the original API of NSApp.

This also brings back the default app menu, which looks like native
macOS apps.

For future refactoring, please note that the menubar must contain at
least one menu before being set to NSApp to avoid weird menubar
rendering.

Fixes #3967.

4 years agoMerge branch 'move-text-history-tests' into 'master'
Matthias Clasen [Wed, 26 May 2021 12:01:58 +0000 (12:01 +0000)]
Merge branch 'move-text-history-tests' into 'master'

Move text history tests

See merge request GNOME/gtk!3597

4 years agoMerge branch 'picture-nullable-setters' into 'master'
Matthias Clasen [Wed, 26 May 2021 11:46:23 +0000 (11:46 +0000)]
Merge branch 'picture-nullable-setters' into 'master'

picture: Make setters actually take NULL

Closes #3974

See merge request GNOME/gtk!3598

4 years agoMove text history tests
Matthias Clasen [Wed, 26 May 2021 11:11:47 +0000 (07:11 -0400)]
Move text history tests

We can test internal apis in our testsuite now,
so move the text history tests there, to have them
run in ci.

4 years agopicture: Make setters actually take NULL
Matthias Clasen [Wed, 26 May 2021 11:30:09 +0000 (07:30 -0400)]
picture: Make setters actually take NULL

gtk_picture_set_file was claiming to be nullable,
but choked on NULL.

Fixes: #3974
4 years agoMerge branch 'bilelmoussaoui/for-gi-docgen-link' into 'master'
Matthias Clasen [Tue, 25 May 2021 23:23:39 +0000 (23:23 +0000)]
Merge branch 'bilelmoussaoui/for-gi-docgen-link' into 'master'

gtk: drop unwanted char on Switch::state-set docs link

See merge request GNOME/gtk!3594

4 years agogtk: drop unwanted char on Switch::state-set docs link
Bilal Elmoussaoui [Tue, 25 May 2021 20:29:46 +0000 (20:29 +0000)]
gtk: drop unwanted char on Switch::state-set docs link

4 years agoMerge branch 'wip/exalm/checks' into 'master'
Matthias Clasen [Tue, 25 May 2021 20:29:06 +0000 (20:29 +0000)]
Merge branch 'wip/exalm/checks' into 'master'

checkbutton: Sync the indicator state with the widget

See merge request GNOME/gtk!3568

4 years agoMerge branch 'fix.vs2013.link' into 'master'
Matthias Clasen [Tue, 25 May 2021 20:27:54 +0000 (20:27 +0000)]
Merge branch 'fix.vs2013.link' into 'master'

gtk/meson.build: Fix linking on Visual Studio 2013

See merge request GNOME/gtk!3575

4 years agoMerge branch 'ebassi/introspection-error' into 'master'
Emmanuele Bassi [Tue, 25 May 2021 18:51:54 +0000 (18:51 +0000)]
Merge branch 'ebassi/introspection-error' into 'master'

Turn introspection scanner warnings into errors

See merge request GNOME/gtk!3588

4 years agoTurn introspection scanner warnings into errors
Emmanuele Bassi [Tue, 25 May 2021 12:54:30 +0000 (13:54 +0100)]
Turn introspection scanner warnings into errors

We want to catch errors in our annotations or our API.

4 years agodocs: Add missing documentation on Windows
Emmanuele Bassi [Tue, 25 May 2021 18:13:46 +0000 (19:13 +0100)]
docs: Add missing documentation on Windows

The gtk_print_run_page_setup_dialog() function, and its asynchronous
variant, are declared in the common gtkprintoperation.h header, but
implemented in different source files depending on the platform.

4 years agoMerge branch 'ignore-nosymbol-press' into 'master'
Matthias Clasen [Tue, 25 May 2021 17:44:45 +0000 (17:44 +0000)]
Merge branch 'ignore-nosymbol-press' into 'master'

imcontext: Ignore NoSymbol key events

Closes #3973

See merge request GNOME/gtk!3591

4 years agoimcontext: Ignore NoSymbol key events
Matthias Clasen [Tue, 25 May 2021 17:17:41 +0000 (13:17 -0400)]
imcontext: Ignore NoSymbol key events

These can happen with some XKB options.

Fixes: #3973
4 years agoMerge branch 'bilelmoussaoui/for-gi-docgen' into 'master'
Emmanuele Bassi [Tue, 25 May 2021 16:23:15 +0000 (16:23 +0000)]
Merge branch 'bilelmoussaoui/for-gi-docgen' into 'master'

gdk: fix wrong doc annotation

See merge request GNOME/gtk!3590

4 years agogdk: fix wrong doc annotation
Bilal Elmoussaoui [Tue, 25 May 2021 16:07:51 +0000 (16:07 +0000)]
gdk: fix wrong doc annotation

4 years agoUpdate Ukrainian translation
Yuri Chornoivan [Tue, 25 May 2021 13:19:55 +0000 (13:19 +0000)]
Update Ukrainian translation

4 years agoMerge branch 'ebassi/docs-fixes' into 'master'
Emmanuele Bassi [Tue, 25 May 2021 12:57:28 +0000 (12:57 +0000)]
Merge branch 'ebassi/docs-fixes' into 'master'

Enable fatal warnings for gi-docgen

See merge request GNOME/gtk!3587

4 years agoEnable fatal warnings when build the docs
Emmanuele Bassi [Tue, 25 May 2021 12:32:32 +0000 (13:32 +0100)]
Enable fatal warnings when build the docs

We want to fail the CI pipeline when the documentation generator emits a
warning.

4 years agodocs: Fix the PANGO_SCALE link
Emmanuele Bassi [Tue, 25 May 2021 12:31:49 +0000 (13:31 +0100)]
docs: Fix the PANGO_SCALE link

The fragment for constants is `const`.

4 years agoMerge branch 'fix-im-reset' into 'master'
Matthias Clasen [Tue, 25 May 2021 12:09:38 +0000 (12:09 +0000)]
Merge branch 'fix-im-reset' into 'master'

imcontextsimple: Fix a possible problem

See merge request GNOME/gtk!3584

4 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Tue, 25 May 2021 11:57:48 +0000 (11:57 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

doc: Syntax fixes

See merge request GNOME/gtk!3583

4 years agodoc: Syntax fixes
Matthias Clasen [Tue, 25 May 2021 11:33:55 +0000 (07:33 -0400)]
doc: Syntax fixes

No, we can't have links that say [constructor@...] or
[mehtod@...] or [methoc@...] or [methos@...] or [metohd@...].
And no, not [signals@...] either.

4 years agoMerge branch 'bilelmoussaoui/gi-docgen-link-fix' into 'master'
Emmanuele Bassi [Tue, 25 May 2021 11:26:08 +0000 (11:26 +0000)]
Merge branch 'bilelmoussaoui/gi-docgen-link-fix' into 'master'

gtk: fix gi-docgen link type

See merge request GNOME/gtk!3582

4 years agogtk: fix gi-docgen link type
Bilal Elmoussaoui [Tue, 25 May 2021 09:25:32 +0000 (09:25 +0000)]
gtk: fix gi-docgen link type

constructors are supposed to use "ctor" as a link type, not new

4 years agoMerge branch 'quartz-elide-underscores' into 'master'
Matthias Clasen [Mon, 24 May 2021 22:55:10 +0000 (22:55 +0000)]
Merge branch 'quartz-elide-underscores' into 'master'

Bring back elide_underscores

See merge request GNOME/gtk!3581

4 years agoimcontextsimple: Fix a possible problem
Matthias Clasen [Mon, 24 May 2021 22:52:14 +0000 (18:52 -0400)]
imcontextsimple: Fix a possible problem

We were forgetting to handle the compose sequence
case in reset().

4 years agoquartz: Elide underscores again
Matthias Clasen [Mon, 24 May 2021 21:37:55 +0000 (17:37 -0400)]
quartz: Elide underscores again

We don't want a literal _File to show up in the
global menubar on OS X, so use the revivied
_gtk_elide_underscores.

Related: #3967

4 years agoBring back elide_underscores
Matthias Clasen [Mon, 24 May 2021 21:37:05 +0000 (17:37 -0400)]
Bring back elide_underscores

This used to live in gtktoolbar.c, which is gone.
We still need it, so put it in gtkprivate.c.

4 years agoMerge branch 'gallery-reflow-fix' into 'master'
Emmanuele Bassi [Mon, 24 May 2021 15:44:26 +0000 (15:44 +0000)]
Merge branch 'gallery-reflow-fix' into 'master'

docs: Convince the widget gallery to reflow

See merge request GNOME/gtk!3579

4 years agodocs: Convince the widget gallery to reflow
Matthias Clasen [Mon, 24 May 2021 14:51:02 +0000 (10:51 -0400)]
docs: Convince the widget gallery to reflow

4 years agoMerge branch 'gst.gl.win32' into 'master'
Matthias Clasen [Mon, 24 May 2021 11:37:06 +0000 (11:37 +0000)]
Merge branch 'gst.gl.win32' into 'master'

media/gstreamer: Support using GL for video for Windows

See merge request GNOME/gtk!3506

4 years agomedia-gstreamer: Provide fallback mode for playback
Chun-wei Fan [Mon, 24 May 2021 08:24:39 +0000 (16:24 +0800)]
media-gstreamer: Provide fallback mode for playback

Make the "gl-context" property of the GstGLSink readable as well so that
we can query whether the GstGLContext sharing really succeeded.  If it
did, then we proceed to playback our video using the glimagesink as we
did before.  If it didn't, throw out the GtkGstSink we were creating, and
re-create the GtkGstSink without the "gl-context" property, meaning that
we won't be using the glimagesink in this case.

4 years agogtkgstsink.c: Support EGL on Windows as well
Chun-wei Fan [Mon, 17 May 2021 08:04:53 +0000 (16:04 +0800)]
gtkgstsink.c: Support EGL on Windows as well

Add support to look for and use the EGL context in Windows if it was activated
instead of desktop OpenGL.

GstGL may have been built with or without EGL/libANGLE support, so if it were,
check in GstGL whether we have gst_gl_display_new_with_type() to create a
GstGLDisplay that is of the GST_GL_WINDOW_WIN32 type when we are using
Desktop OpenGL (WGL), otherwise we show messages indicating that envvars
need to be set to initialize GstGL properly.

Due to a bug in GstGL, the GstGLContext can only be set up successfully
if one of the following is true:

*  An OpenGL 3.x or later emulator, such as Mesa is used (for WGL)
*  The latest GstGL master is being used, at the time of writing (for
   WGL)
*  GTK, libepoxy and GstGL are all built only with WGL support (for WGL)
*  EGL is being used in GTK at runtime

Special thanks to Matthew Waters for the help during the process.

4 years agomedia/gstreamer: Support using GL for video for Windows
Chun-wei Fan [Sat, 13 Feb 2021 10:40:56 +0000 (18:40 +0800)]
media/gstreamer: Support using GL for video for Windows

Add support to share the WGL context in GDK with the WGL context in GStreamer,
so that we can also use OpenGL in the gstreamer media backend to playback
videos.  For now OpenGL/ES is not supported for this under Windows.

The process of setting this up in Windows is a little bit more involved, as:

*  The OpenGL support in GstGL requires a GL 4.1 Core context, but we may just
   get the GL version from wglCreateContextAttribsARB() that we pass into the
   attributes, which is 3.2 by default.  So, try to ask for a 4.1 Core context
   first if we are asking for anything less.

*  There is only one GstDisplay available for Windows, so we just use
   gst_gl_display_new().

*  We must explicitly tell libepoxy that we are using wglMakeCurrent() outside
   of libepoxy that is being used in GdkGL, otherwise we would end up crashing
   as the GL/WGL function pointers would become invalid.

*  We must also deactivate temporarily the underlying WGL context that was made
   current by gdk_gl_context_make_current() so that when
   gst_gl_display_create_context() calls wglShareLists(), we won't get bitten
   by error 0xaa (resource busy), as some drivers don't handle this well when
   the GL context is current in another thread.

For the last two points we make use of macros defined by the platforms that the
build is done for to help us carry out the necessary tasks as needed.

Thanks to Matthew Waters for the info on integrating GstGL and windowing
toolkits on Windows.

4 years agogtk/meson.build: Fix linking on Visual Studio 2013
Chun-wei Fan [Sat, 22 May 2021 14:11:05 +0000 (22:11 +0800)]
gtk/meson.build: Fix linking on Visual Studio 2013

Visual Studio 2013's linker does not suport `/WHOLEARCHIVE:`, so just
explicitly extract the objects from the static libraries that will
form the final GTK DLL.

4 years agoMerge branch 'focusable-fixes' into 'master'
Matthias Clasen [Sun, 23 May 2021 15:53:27 +0000 (15:53 +0000)]
Merge branch 'focusable-fixes' into 'master'

label: Fix mnemonic activation

Closes #3965

See merge request GNOME/gtk!3578

4 years agotreeviewcolumn: Use focusable when we mean it
Matthias Clasen [Sun, 23 May 2021 14:37:14 +0000 (10:37 -0400)]
treeviewcolumn: Use focusable when we mean it

The focusable property has taken over the role that
can-focus had in GTK 3.

4 years agotreeexpander: Use focusable where we mean it
Matthias Clasen [Sun, 23 May 2021 14:33:40 +0000 (10:33 -0400)]
treeexpander: Use focusable where we mean it

This does not fix keyboard activation for tree expanders,
but it is more correct than using can-focus.

4 years agotogglebutton: Fix mnemonic activation
Matthias Clasen [Sun, 23 May 2021 14:26:21 +0000 (10:26 -0400)]
togglebutton: Fix mnemonic activation

We want to grab the focus when we're focusable, so
look at the focusable property.

4 years agofloxbox: Fix focus navigation
Matthias Clasen [Sun, 23 May 2021 14:25:11 +0000 (10:25 -0400)]
floxbox: Fix focus navigation

We want to find focusable children, so we need to look at
the focusable property, not at can-focus. This is a change
from GTK 3, where can-focus was the correct property to
look at.

4 years agolabel: Fix mnemonic activation
Matthias Clasen [Sun, 23 May 2021 14:23:08 +0000 (10:23 -0400)]
label: Fix mnemonic activation

The intention of the code is to find a focusable ancestor,
so it needs to look at the focusable property, not at
can-focus. This is a change from GTK 3, where can-focus
was the correct property to look at.

Fixes: #3965
4 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Sun, 23 May 2021 02:14:01 +0000 (02:14 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

demos: Clean up doc comments

See merge request GNOME/gtk!3574

4 years agodocs: More syntax fixes
Matthias Clasen [Sun, 23 May 2021 01:21:10 +0000 (21:21 -0400)]
docs: More syntax fixes

The syntax for interface links is [iface@...], not
[interface@...].

4 years agodocs: More syntax fixes
Matthias Clasen [Sun, 23 May 2021 01:20:10 +0000 (21:20 -0400)]
docs: More syntax fixes

[`func@Foo`] is not the right link syntax either.

4 years agodocs: Fix up syntax
Matthias Clasen [Sun, 23 May 2021 00:41:05 +0000 (20:41 -0400)]
docs: Fix up syntax

There's no [type_func@...[ syntax, it is all [func@...].

4 years agodocs: Sync up debug flag information
Matthias Clasen [Sun, 23 May 2021 00:41:48 +0000 (20:41 -0400)]
docs: Sync up debug flag information

4 years agotreemodel: Cosmetic docs changes
Matthias Clasen [Sun, 23 May 2021 00:44:03 +0000 (20:44 -0400)]
treemodel: Cosmetic docs changes

4 years agosortlistmodel: Cosmetic docs changes
Matthias Clasen [Sun, 23 May 2021 00:43:29 +0000 (20:43 -0400)]
sortlistmodel: Cosmetic docs changes

4 years agoexpression: Cosmetic docs changes
Matthias Clasen [Sat, 22 May 2021 21:24:55 +0000 (17:24 -0400)]
expression: Cosmetic docs changes

4 years agotextbuffer: Cosmetic docs changes
Matthias Clasen [Sat, 22 May 2021 19:02:10 +0000 (15:02 -0400)]
textbuffer: Cosmetic docs changes

4 years agotextview: Cosmetic docs changes
Matthias Clasen [Sat, 22 May 2021 19:01:49 +0000 (15:01 -0400)]
textview: Cosmetic docs changes

4 years agotext: Cosmetic docs fixes
Matthias Clasen [Sat, 22 May 2021 19:01:08 +0000 (15:01 -0400)]
text: Cosmetic docs fixes

4 years agowidget: Cosmetic docs changes
Matthias Clasen [Sat, 22 May 2021 18:46:07 +0000 (14:46 -0400)]
widget: Cosmetic docs changes

4 years agoshortcutscontroller: Cosmetic docs changes
Matthias Clasen [Sat, 22 May 2021 18:43:21 +0000 (14:43 -0400)]
shortcutscontroller: Cosmetic docs changes

4 years agogdk: Cosmetic docs changes
Matthias Clasen [Sat, 22 May 2021 18:43:11 +0000 (14:43 -0400)]
gdk: Cosmetic docs changes

4 years agodirectorylist: Cosmetic docs changes
Matthias Clasen [Sat, 22 May 2021 18:40:19 +0000 (14:40 -0400)]
directorylist: Cosmetic docs changes

4 years agoeventcontroller: Cosmetic docs changes
Matthias Clasen [Sat, 22 May 2021 18:27:25 +0000 (14:27 -0400)]
eventcontroller: Cosmetic docs changes

4 years agosorter: Cosmetic docs changes
Matthias Clasen [Sat, 22 May 2021 18:23:55 +0000 (14:23 -0400)]
sorter: Cosmetic docs changes

4 years agofilter: Cosmetic docs changes
Matthias Clasen [Sat, 22 May 2021 18:11:53 +0000 (14:11 -0400)]
filter: Cosmetic docs changes

4 years agodocs: Refer to backend APIs
Matthias Clasen [Sat, 22 May 2021 17:51:39 +0000 (13:51 -0400)]
docs: Refer to backend APIs

Add links to the backend api docs.

4 years agodocs: Fix a typo
Matthias Clasen [Sat, 22 May 2021 17:51:24 +0000 (13:51 -0400)]
docs: Fix a typo

4 years agodocs: Avoid stairstepping
Matthias Clasen [Sat, 22 May 2021 17:16:02 +0000 (13:16 -0400)]
docs: Avoid stairstepping

If you don't put empty lines between the items in a
definition list, markdown helpfully stairsteps them.
We don't want that!

4 years agodocs: Update GSK_RENDERER docs
Matthias Clasen [Sat, 22 May 2021 17:09:54 +0000 (13:09 -0400)]
docs: Update GSK_RENDERER docs

This did not mention the opengl and ngl values yet.

4 years agogtk: Clean up docs syntax
Matthias Clasen [Thu, 20 May 2021 13:17:04 +0000 (09:17 -0400)]
gtk: Clean up docs syntax

Replace leftover gtk-doc syntax (#Type) with backquotes.

4 years agogsk: Clean up docs syntax
Matthias Clasen [Thu, 20 May 2021 03:40:54 +0000 (23:40 -0400)]
gsk: Clean up docs syntax

Replace leftover gtk-doc syntax (#Type) with backquotes.

4 years agogdk: Clean up docs syntax
Matthias Clasen [Thu, 20 May 2021 03:39:18 +0000 (23:39 -0400)]
gdk: Clean up docs syntax

Replace leftover gtk-doc syntax (#Type) with backquotes.

4 years agodocs: Clean up docs syntax
Matthias Clasen [Thu, 20 May 2021 03:40:14 +0000 (23:40 -0400)]
docs: Clean up docs syntax

Replace leftover gtk-doc syntax (#Type) with backquotes.

4 years agodemos: Clean up doc comments
Matthias Clasen [Thu, 20 May 2021 13:16:19 +0000 (09:16 -0400)]
demos: Clean up doc comments

These don't show up anywhere, but might still clean
them up.

4 years agoUpdate POTFILES.in
Piotr Drąg [Fri, 21 May 2021 12:28:58 +0000 (14:28 +0200)]
Update POTFILES.in

4 years agoMerge branch 'wip/exalm/check-activate' into 'master'
Matthias Clasen [Fri, 21 May 2021 02:06:58 +0000 (02:06 +0000)]
Merge branch 'wip/exalm/check-activate' into 'master'

checkbutton: Don't allow to uncheck radios by activating them

See merge request GNOME/gtk!3569

4 years agoMerge branch 'doc-tweaks' into 'master'
Matthias Clasen [Fri, 21 May 2021 01:18:58 +0000 (01:18 +0000)]
Merge branch 'doc-tweaks' into 'master'

Fix documentation syntax

See merge request GNOME/gtk!3572

4 years agodocs: Reduce redundancy
Matthias Clasen [Fri, 21 May 2021 00:45:06 +0000 (20:45 -0400)]
docs: Reduce redundancy

Remove a boatload of "or %NULL" from nullable parameters
and return values. gi-docgen generates suitable text from
the annotation that we don't need to duplicate.

This adds a few missing nullable annotations too.

4 years agointrospection: Stop using allow-none
Matthias Clasen [Wed, 19 May 2021 11:24:34 +0000 (07:24 -0400)]
introspection: Stop using allow-none

allow-none has been deprecated for a long time
already. Instead use optional and nullable everywhere.

4 years agoDocumentation fixes
Matthias Clasen [Tue, 18 May 2021 21:05:26 +0000 (17:05 -0400)]
Documentation fixes

Mostly fixing up indentation of continuation lines,
and other small cleanups.

4 years agoFix documentation syntax
Matthias Clasen [Thu, 20 May 2021 23:16:59 +0000 (19:16 -0400)]
Fix documentation syntax

Properties use : in their link syntax.

4 years agoMerge branch 'wip/exalm/switch-icons-2' into 'master'
Matthias Clasen [Thu, 20 May 2021 22:49:29 +0000 (22:49 +0000)]
Merge branch 'wip/exalm/switch-icons-2' into 'master'

icons: Fix switch-off icon

See merge request GNOME/gtk!3571

4 years agoicons: Fix switch-off icon
Alexander Mikhaylenko [Thu, 20 May 2021 18:36:30 +0000 (23:36 +0500)]
icons: Fix switch-off icon

It wasn't converted to paths and so wasn't rendered correctly.

4 years agoMerge branch 'popover-docs' into 'master'
Matthias Clasen [Thu, 20 May 2021 13:55:47 +0000 (13:55 +0000)]
Merge branch 'popover-docs' into 'master'

popover: Update docs

Closes #3960

See merge request GNOME/gtk!3570

4 years agopopover: Update docs
Matthias Clasen [Tue, 18 May 2021 18:50:03 +0000 (14:50 -0400)]
popover: Update docs

Remove mention of show/hide animations, and mention
cascading close instead.

Fixes: #3960
4 years agocheckbutton: Don't allow to uncheck radios by activating them
Alexander Mikhaylenko [Thu, 20 May 2021 09:38:33 +0000 (14:38 +0500)]
checkbutton: Don't allow to uncheck radios by activating them

Do the same check as when clicking.

4 years agoUpdate Ukrainian translation
Yuri Chornoivan [Thu, 20 May 2021 07:29:07 +0000 (07:29 +0000)]
Update Ukrainian translation

4 years agoUpdate Ukrainian translation
Yuri Chornoivan [Thu, 20 May 2021 07:27:43 +0000 (07:27 +0000)]
Update Ukrainian translation

4 years agocheckbutton: Sync the indicator state with the widget
Alexander Mikhaylenko [Thu, 20 May 2021 07:16:32 +0000 (12:16 +0500)]
checkbutton: Sync the indicator state with the widget

Clicking the whole check button toggles it, so make sure the hover and
active states are propagated to the indicator like in GTK3.

4 years agoMerge branch 'bilelmoussaoui/gdk-return-error-annotation' into 'master'
Matthias Clasen [Thu, 20 May 2021 03:54:15 +0000 (03:54 +0000)]
Merge branch 'bilelmoussaoui/gdk-return-error-annotation' into 'master'

gdk: annotate Content Serialize/Deserialize return_error

See merge request GNOME/gtk!3567

4 years agogdk: annotate Content Serialize/Deserialize return_error
Bilal Elmoussaoui [Wed, 19 May 2021 18:10:34 +0000 (18:10 +0000)]
gdk: annotate Content Serialize/Deserialize return_error

4 years agoMerge branch 'fix-gst-media-file' into 'master'
Benjamin Otte [Wed, 19 May 2021 16:22:35 +0000 (16:22 +0000)]
Merge branch 'fix-gst-media-file' into 'master'

gtkgstmediafile: Remove media-info-updated callback

Closes #3913

See merge request GNOME/gtk!3565

4 years agogtkgstmediafile: Remove media-info-updated callback
Ivan Molodetskikh [Wed, 19 May 2021 15:55:37 +0000 (18:55 +0300)]
gtkgstmediafile: Remove media-info-updated callback

Instead, rely on position-updated which is also called always, and also
a little later than media-info-updated, giving GstPlayer time to figure
out more of the video info. Tested on local and remote mount videos,
images, sound files.

Works around / fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3913,
https://gitlab.gnome.org/GNOME/gtk/-/issues/3914.

4 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Tue, 18 May 2021 11:42:33 +0000 (11:42 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Actually pass the devel profile to flatpak builds

See merge request GNOME/gtk!3563

4 years agoActually pass the devel profile to flatpak builds
Matthias Clasen [Tue, 18 May 2021 11:37:09 +0000 (07:37 -0400)]
Actually pass the devel profile to flatpak builds

I added that to the manifests, and did not notice that
we do the last build step manually :(

4 years agoMerge branch 'wip/carlosg/sequence-accepted-in-group' into 'master'
Matthias Clasen [Tue, 18 May 2021 10:58:19 +0000 (10:58 +0000)]
Merge branch 'wip/carlosg/sequence-accepted-in-group' into 'master'

gtkgesture: Apply gesture group state after setting up sequence

Closes #3946

See merge request GNOME/gtk!3560

4 years agoMerge branch 'fix-gen-demo-conf' into 'master'
Matthias Clasen [Tue, 18 May 2021 10:31:57 +0000 (10:31 +0000)]
Merge branch 'fix-gen-demo-conf' into 'master'

Fix generating demo_conf.h on builds without GIT in PATH

See merge request GNOME/gtk!3562

4 years agogen-demo-header.py: Fix running without git
Chun-wei Fan [Tue, 18 May 2021 03:02:27 +0000 (11:02 +0800)]
gen-demo-header.py: Fix running without git

The script assumes that the git program is in the PATH which may not be always
the case, so if git was not found, fallback to the former behavior of making
VCS_TAG an empty string if the profile option was not set to 'devel'.

Also fix the call to the script so that we do indeed call GIT on the source GIT
repo so that we can get the right short SHA1 sum.

Re-organize the code a bit in the process, so that things seem cleaner.

4 years agoMerge branch 'wip/carlosg/reset-after-grab' into 'master'
Matthias Clasen [Mon, 17 May 2021 23:35:26 +0000 (23:35 +0000)]
Merge branch 'wip/carlosg/reset-after-grab' into 'master'

Fixes to GTK grab notification

Closes #3942

See merge request GNOME/gtk!3561

4 years agogtkwindow: Fix "shadowed" checks for GTK grabs
Carlos Garnacho [Mon, 17 May 2021 21:57:17 +0000 (23:57 +0200)]
gtkwindow: Fix "shadowed" checks for GTK grabs

We iterate here from the target widget up the toplevel checking
for the previous and new grab, there's however 2 bugs here:
- The check for is_shadowed was different to the check for was_shadowed
- The loop started with the assumption that the widgets did not hold
  a grab, just to change it if the grab widget was found. (or maybe
  it's the other way around? it's unclear with the differing checks
  for past/present state).

Make these checks consistent, and ensure we start with the right
assumption for the past/present grabbing state, and accounting that
new/old grab widgets may or may not be part of the pick stack.

4 years agogtkwindow: Rename function
Carlos Garnacho [Mon, 17 May 2021 21:55:47 +0000 (23:55 +0200)]
gtkwindow: Rename function

With gtk_grab_notify_foreach() just taking care of emitting crossing
notifications due to the GTK grab change, rename it to a more apt
gtk_synthesize_grab_crossing().

4 years agogtkwindow: Simplify GTK grab notification
Carlos Garnacho [Mon, 17 May 2021 21:44:28 +0000 (23:44 +0200)]
gtkwindow: Simplify GTK grab notification

The _gtk_widget_grab_notify() function just (maybe) did a) reset
controllers and b) hide toplevels. The second part was a testing
remnant introduced in commit 024d832d943, not part of the original
fix.

Do the former more concisely, called from the place where we figure
out whether a widget's ability to receive events changed due to
GTK grabs. It's across those changes that we are interested in
resetting the controllers.

With the gestures being reset both ways, GtkWindowHandle (and
probably other) gestures are now able to reset after a GTK grab
takes input away (e.g. GtkMenuButton). This could be seen as
a sudden jump the next time they'd be dragged with the mouse,
as the gesture would "resume" the previous interaction.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3942
4 years agogtkgesture: Apply gesture group state after setting up sequence
Carlos Garnacho [Mon, 17 May 2021 21:34:44 +0000 (23:34 +0200)]
gtkgesture: Apply gesture group state after setting up sequence

When a new sequence is added to a GtkGesture, its state is looked
in other gestures in the same group, and made to match in this
gesture. This however happened a bit too early, before the
gesture touchpoint was fully set up. As this may result in signal
emission and whatnot, it's a good idea to make it happen with a
fully set up touchpoint.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3946
4 years agoMerge branch 'ebassi/rev-parse-fallback' into 'master'
Matthias Clasen [Mon, 17 May 2021 21:13:04 +0000 (21:13 +0000)]
Merge branch 'ebassi/rev-parse-fallback' into 'master'

build: Check CI envvars before rev-parse

See merge request GNOME/gtk!3559

4 years agobuild: Check CI envvars before rev-parse
Emmanuele Bassi [Mon, 17 May 2021 20:12:09 +0000 (21:12 +0100)]
build: Check CI envvars before rev-parse

The CI pipeline does not do a full clone, so we cannot use `git
rev-parse` to get the short SHA checksum for the current commit.

Of course, since nothing's ever easy, we cannot use vcs_tag() with a
custom command, so we need to generate our out `demo_conf.h` header
straight from a script.